﻿<%@ Page Title="Who is online - Nivdal.com!" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" 
CodeBehind="WhoIsOnline.aspx.cs" Inherits="Nivdal.WhoIsOnline" Theme="SkinFile" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadPlaceHolder" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="basic_element">
    <div class="red_title">
       <asp:Label ID="PageTitleLabel" runat="server" Text="Site admin >> Who is online" CssClass="white_title"></asp:Label>
    </div>
    <div class="padding5">

    <asp:GridView ID="UsersGridview" runat="server" SkinID="Professional" DataSourceID="OnlineUsersDataSourse"
     AutoGenerateColumns="false" AllowPaging="false">
        <PagerSettings FirstPageText="<%$ Resources:Resource, FirstPage %>" LastPageText="<%$ Resources:Resource, LastPage %>"
            Mode="NumericFirstLast" PageButtonCount="10" Position="Bottom" />
        <PagerStyle CssClass="pagination" HorizontalAlign="Center" />
        <Columns>
            <asp:TemplateField> 
                <ItemTemplate> 
                    <asp:Label ID="NumberLabel" runat="server" Text="<%# Container.DataItemIndex + 1 %>" SkinID="GridLabel"></asp:Label>  
                </ItemTemplate> 
            </asp:TemplateField>
            <asp:TemplateField HeaderText="User">
                <ItemTemplate>
                    <asp:HyperLink ID="CountryHyperlink" runat="server" NavigateUrl='<%# "~/Country.aspx?Id=" + Eval("Nationality") %>'
                     ImageUrl='<%# "~/Images/Flags/" + Eval("Flag") %>' ToolTip='<%# Eval("CountryName") %>'></asp:HyperLink>
                    <asp:HyperLink ID="UserHyperlink" runat="server" NavigateUrl='<%# "~/UserPage.aspx?Id=" + Eval("UserId") %>'
                     Text='<%# Eval("UserName") %>' SkinID="GreenTitleHyperLink"></asp:HyperLink>
                </ItemTemplate>
            </asp:TemplateField>    
            <asp:TemplateField HeaderText="Team">
                <ItemTemplate>
                    <asp:HyperLink ID="TeamHyperlink" runat="server" NavigateUrl='<%# "~/TeamHomePage.aspx?TeamId=" + Eval("TeamId") %>'
                        Text='<%# Eval("TeamName") %>' SkinID="GreenTitleHyperLink"></asp:HyperLink> 
                </ItemTemplate>
            </asp:TemplateField> 
        </Columns>
    </asp:GridView>   
    

    <asp:SqlDataSource ID="OnlineUsersDataSourse" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="Nivdal_WhoIsOnline" SelectCommandType="StoredProcedure">
    </asp:SqlDataSource>
    
    </div>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="PageNamePlaceHolder" runat="server">
    <asp:Label ID="PageNameLabel" runat="server" Text="Site admin >> Who is online" CssClass="PageNameContentStyle"></asp:Label>
</asp:Content>
